package com.dxt.common;

import com.dxt.service.CacheManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class MyCommandLineRunner implements CommandLineRunner {
    private static final Logger logger = LoggerFactory.getLogger(Thread.currentThread().getStackTrace()[1].getClassName());
    @Autowired
    CacheManager cacheManager;
    @Override
    public void run(String... var1) throws Exception{
        cacheManager.initCache();
        logger.info("初始化加载部分配置数据");
    }

}
